package com.mofang.activity.interact;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

import com.mofang.R;
import com.mofang.activity.BaseTitleViewActiviey;
import com.mofang.activity.MainActivity;

public class MainInteractionActivity extends BaseTitleViewActiviey implements
		OnClickListener {

	private LinearLayout interactive_knowledge_ly;
	private LinearLayout interactive_certificate_ly;
	private LinearLayout interactive_loan_ly;
	private LinearLayout interactive_loan_calculator_ly;
	private LinearLayout interactive_tax_calculator_ly;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main_interaction);
		setNavigationTitle("互动");

		findView();

	}

	private void findView() {

		interactive_knowledge_ly = (LinearLayout) findViewById(R.id.interactive_knowledge_ly);
		interactive_knowledge_ly.setOnClickListener(this);
		interactive_certificate_ly = (LinearLayout) findViewById(R.id.interactive_certificate_ly);
		interactive_certificate_ly.setOnClickListener(this);
		interactive_loan_ly = (LinearLayout) findViewById(R.id.interactive_loan_ly);
		interactive_loan_ly.setOnClickListener(this);
		interactive_loan_calculator_ly = (LinearLayout) findViewById(R.id.interactive_loan_calculator_ly);
		interactive_loan_calculator_ly.setOnClickListener(this);
		interactive_tax_calculator_ly = (LinearLayout) findViewById(R.id.interactive_tax_calculator_ly);
		interactive_tax_calculator_ly.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent intent;
		switch (v.getId()) {
		case R.id.interactive_knowledge_ly:
			intent = new Intent(getApplicationContext(), InteractiveKnowledgeActivity.class);
			startActivity(intent);
			break;
		case R.id.interactive_certificate_ly:

			intent = new Intent(getApplicationContext(), InteractiveKnowledgeActivity.class);
			startActivity(intent);

			break;
		case R.id.interactive_loan_ly:

			intent = new Intent(getApplicationContext(), InteractiveKnowledgeActivity.class);
			startActivity(intent);

			break;
		case R.id.interactive_loan_calculator_ly:

			intent = new Intent(getApplicationContext(),
					LoanCalculateActivity.class);
			startActivity(intent);

			break;
		case R.id.interactive_tax_calculator_ly:

			intent = new Intent(getApplicationContext(),
					TaxCalculatorActivity.class);
			startActivity(intent);

			break;

		default:
			break;
		}

	}

}
